import CreateLectures from '@/components/teacher-lectures/CreateLectures'
import LecturesManage from '@/components/teacher-lectures/LecturesManage'

export default [
  {
    path: '/create-lectures',
    name: 'CreateLectures',
    meta: {title: '我要开课', zIndex: 0},
    component: CreateLectures
  }, {
    path: '/edit-lectures',
    name: 'EditLectures',
    meta: {title: '开课编辑', zIndex: 1},
    component: CreateLectures
    // redirect: (to, from, next) => {
    //   // 没数据情况进行重定向
    //   if (to.name === 'EditLectures') { // 编辑情况
    //     if (to.params.id === undefined) {
    //       return {name: 'LecturesManage'}
    //     }
    //   }
    // }
  }, {
    path: '/lectures-manage',
    name: 'LecturesManage',
    meta: {title: '开课记录', zIndex: 2},
    component: LecturesManage
  }
]
